/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package org.opmviewer.graphviz;

import java.awt.Shape;
import prefuse.render.ShapeRenderer;
import prefuse.visual.VisualItem;

/**
 *
 * @author grzegorz
 */
public class MyNodeRenderer extends ShapeRenderer {
    @Override
    public Shape getRawShape(VisualItem node) {
        double w = node.getDouble("w");
        double h = node.getDouble("h");
        if (node.getString("TYPE").equals("process")) {
            return rectangle(node.getX(), node.getY(), w, h);
        }
        
        return ellipse(node.getX(), node.getY(), w, h);

    }
}
